Skip to content

[Split 1/3] Restructure modules: java/android → core/core-android under io.ably.pubsub - #1232

Merged
ttypic merged 2 commits into
integration/v2from
integration/split-1-core-modules
Sep 16, 2026
Merged

ttypic merged 2 commits into
integration/v2from
integration/split-1-core-modules

Conversation

@umair-ably

@umair-ably umair-ably commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

First of a stack of PRs applying PDR-091b (PubSub device/server package split, major releases) to this repo, targeting the long-lived integration/v2 branch. Reference implementation: ably-js#2293.

What this PR does

  • javacore: publishes io.ably.pubsub:core (jar, JVM) — was io.ably:ably-java.
  • androidcore-android: publishes io.ably.pubsub:core-android (aar) — was io.ably:ably-android.
  • GROUP=io.ably.pubsub, VERSION_NAME=2.0.0: everything the repo publishes moves to the new group and major in lockstep (liveobjects, pubsub-adapter, network-client-* ride along, per the rollout plan).
  • Both core POMs declare themselves internal implementation artifacts for Ably's own device/server packages, not for direct use (per PDR-091b §1).
  • liveobjects, pubsub-adapter, uts, examples retarget project(":java"/":android")":core"/":core-android"; integration-test.yml, emulate.yml, javadoc.yml, CONTRIBUTING.md and uts/README.md follow.
  • Pure git mv for the module directories — history follows.

What this PR deliberately does not do

  • No door packages yet — io.ably.pubsub:device / io.ably.pubsub:server land in the next PR in the stack.
  • No repo rename, no publishing, no API renames (⚠️ PDR-091d is still in review).
  • The core keeps the ably-java/<version> base agent identifier (matching ably-js, whose core keeps ably-js/<version>); side-declaring agents are stamped by the door packages (next PR).
  • io.ably:ably-java / io.ably:ably-android 1.x are never published from this branch; fixes ship from a maintenance branch cut before the integration merge.

Notes for reviewers

  • The Java package namespace (io.ably.lib.*) is unchanged in the cores for now — the namespace decision (new pubsub root package vs. documented classpath-collision hazard) and the ⚠️091d Rest*Http* pass are deliberately sequenced later on the integration branch.
  • core-android/src/main/resources/META-INF/io/ably/ably-android/verification.properties still carries the verification token issued for io.ably:ably-android — a new token for the new artifact id needs requesting before GA (tracked in the rollout plan).
  • deploy/check-archives.sh was already stale (greps a build.gradle that no longer exists); untouched here.

Verified locally: checkWithCodenarc checkstyleMain checkstyleTest runUnitTests runLiveObjectsUnitTests :uts:runUtsUnitTests green; :core-android:compileReleaseJavaWithJavac green; publishToMavenLocal produces the expected io/ably/pubsub/{core,core-android,liveobjects,pubsub-adapter,network-client-*}/2.0.0 coordinates.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated project structure and build workflows to use the new core JVM and Android modules.
    • Updated examples, integration tests, documentation, and development instructions to reference the revised modules.
    • Added Maven publishing metadata for the core artifacts and updated the package group and version to 2.0.0.
    • Updated generated documentation and test report locations.
  • Tests
    • Updated the expected Java client agent header for version 2.0.0.

…e/core-android

Applies the first step of PDR-091b to this repo: the shared implementation
becomes the new internal core artifacts, published under the io.ably.pubsub
group at the new 2.0.0 major.

- The `java` module becomes `core`, publishing io.ably.pubsub:core (jar).
- The `android` module becomes `core-android`, publishing
  io.ably.pubsub:core-android (aar).
- GROUP moves to io.ably.pubsub and VERSION_NAME to 2.0.0 for everything
  this repo publishes (liveobjects, pubsub-adapter and network-client-*
  move group alongside, per the rollout plan).
- Both core POMs state explicitly that they are internal implementation
  artifacts for Ably's own device/server packages, not for direct use.
- liveobjects, pubsub-adapter, uts and examples retarget their project
  dependencies; CI workflows, CONTRIBUTING and the uts README follow the
  new task paths.

The io.ably:ably-java and io.ably:ably-android artifacts are never
published from this branch again; 1.x fixes ship from a maintenance
branch per PDR-091b.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@paddybyers

Copy link
Copy Markdown
Member

So is the idea here that, if I'm using java on a server say, I now need two artifacts: io.ably.pubsub:server and io.ably.pubsub:core ?

@umair-ably

Copy link
Copy Markdown
Contributor Author

So is the idea here that, if I'm using java on a server say, I now need two artifacts: io.ably.pubsub:server and io.ably.pubsub:core ?

afaict, you declare one dependency, io.ably.pubsub:server, and Maven/Gradle resolves io.ably.pubsub:core transitively

@paddybyers

Copy link
Copy Markdown
Member

So is the idea here that, if I'm using java on a server say, I now need two artifacts: io.ably.pubsub:server and io.ably.pubsub:core ?

afaict, you declare one dependency, io.ably.pubsub:server, and Maven/Gradle resolves io.ably.pubsub:core transitively

That's true, but why is it necessary? What's the problem with having a single server artifact that contains the server and core java packages?

@umair-ably

Copy link
Copy Markdown
Contributor Author

So is the idea here that, if I'm using java on a server say, I now need two artifacts: io.ably.pubsub:server and io.ably.pubsub:core ?

afaict, you declare one dependency, io.ably.pubsub:server, and Maven/Gradle resolves io.ably.pubsub:core transitively

That's true, but why is it necessary? What's the problem with having a single server artifact that contains the server and core java packages?

If I'm understanding correctly, you're suggesting we solely have just 2 packages - device and server, and each of these have "core" embedded in them.

There's a couple reasons having core live outside works better imo...

  1. As answered above, transitive package handling means the end users don't need to know about core anyway
  2. Other products that build on a pubsub realtime client e.g. Chat, can work with either the device or server pubsub package, but they need a shared understanding of what that realtime interface is. The core split keeps that shared understanding between them. Another solution would be that Chat itself declares the interface it needs, but this gets into the realms of type erasure and inverting how this model works today.
  3. There are packages that should be neutral e.g. LiveObjects. We currently just pass in a LiveObjects plugin without needing to declare device or server (hence the DR's decision of it being okay for internal dependencies to rely on core). If we bundled Core into the device and server packages, LiveObjects would need to identify as one or the other which breaks the mental model for how it works

I've been speaking with @AndyTWF about this too, so happy for us 3 to jump on a call if we need to

…2.0.0

The test deliberately hardcodes the expected ably-java/<version> agent
value rather than deriving it from Defaults (per its own comment), so it
must be bumped with VERSION_NAME. The wire value was already correctly
ably-java/2.0.0; only the canary was stale.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: bd071bee-e24e-44d6-836f-4967b6516b46

📥 Commits

Reviewing files that changed from the base of the PR and between 74d267f and acb8e2e.

📒 Files selected for processing (53)
  • .github/workflows/emulate.yml
  • .github/workflows/integration-test.yml
  • .github/workflows/javadoc.yml
  • CONTRIBUTING.md
  • android/gradle.properties
  • core-android/.gitignore
  • core-android/build.gradle.kts
  • core-android/gradle.properties
  • core-android/proguard.txt
  • core-android/src/androidTest/java/io/ably/lib/push/LocalDeviceStorageTest.java
  • core-android/src/androidTest/java/io/ably/lib/test/RetryTestRule.java
  • core-android/src/androidTest/java/io/ably/lib/test/android/AndroidPushTest.java
  • core-android/src/androidTest/java/io/ably/lib/test/android/AndroidSuite.java
  • core-android/src/androidTest/java/io/ably/lib/test/android/EventTest.java
  • core-android/src/androidTest/java/io/ably/lib/test/loader/ArgumentLoader.java
  • core-android/src/androidTest/java/io/ably/lib/test/loader/ResourceLoader.java
  • core-android/src/androidTest/java/io/ably/lib/types/RegistrationTokenTypeTest.java
  • core-android/src/main/.gitignore
  • core-android/src/main/AndroidManifest.xml
  • core-android/src/main/java/io/ably/lib/platform/AndroidNetworkConnectivity.java
  • core-android/src/main/java/io/ably/lib/platform/Platform.java
  • core-android/src/main/java/io/ably/lib/push/ActivationContext.java
  • core-android/src/main/java/io/ably/lib/push/ActivationStateMachine.java
  • core-android/src/main/java/io/ably/lib/push/LocalDevice.java
  • core-android/src/main/java/io/ably/lib/push/Push.java
  • core-android/src/main/java/io/ably/lib/push/PushChannel.java
  • core-android/src/main/java/io/ably/lib/push/SharedPreferenceStorage.java
  • core-android/src/main/java/io/ably/lib/realtime/Channel.java
  • core-android/src/main/java/io/ably/lib/rest/AblyRest.java
  • core-android/src/main/java/io/ably/lib/rest/Channel.java
  • core-android/src/main/java/io/ably/lib/types/RegistrationToken.java
  • core-android/src/main/java/io/ably/lib/util/AndroidPlatformAgentProvider.java
  • core-android/src/main/java/io/ably/lib/util/IntentUtils.java
  • core-android/src/main/resources/META-INF/io/ably/ably-android/verification.properties
  • core/build.gradle.kts
  • core/gradle.properties
  • core/src/main/java/io/ably/lib/platform/Platform.java
  • core/src/main/java/io/ably/lib/push/Push.java
  • core/src/main/java/io/ably/lib/realtime/Channel.java
  • core/src/main/java/io/ably/lib/rest/AblyRest.java
  • core/src/main/java/io/ably/lib/rest/Channel.java
  • core/src/main/java/io/ably/lib/util/JavaPlatformAgentProvider.java
  • core/src/test/java/io/ably/lib/test/loader/ArgumentLoader.java
  • core/src/test/java/io/ably/lib/test/loader/ResourceLoader.java
  • examples/build.gradle.kts
  • gradle.properties
  • java/gradle.properties
  • lib/src/test/java/io/ably/lib/test/realtime/RealtimeHttpHeaderTest.java
  • liveobjects/build.gradle.kts
  • pubsub-adapter/build.gradle.kts
  • settings.gradle.kts
  • uts/README.md
  • uts/build.gradle.kts

Disabled knowledge base sources:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

The project now uses core and core-android instead of java and android. Publishing coordinates, dependent modules, CI workflows, contributor commands, and documentation were updated accordingly. The Maven version is now 2.0.0.

Changes

Core module transition

Layer / File(s) Summary
Module registration and dependency wiring
settings.gradle.kts, examples/build.gradle.kts, liveobjects/build.gradle.kts, pubsub-adapter/build.gradle.kts, uts/*
Gradle settings and dependent projects now reference core and core-android instead of java and android.
Publishing metadata and version alignment
gradle.properties, core/gradle.properties, core-android/gradle.properties, java/gradle.properties, android/gradle.properties, lib/src/test/.../RealtimeHttpHeaderTest.java
Publishing metadata moved to the core modules. The Maven group and version changed to io.ably.pubsub and 2.0.0. The request-header test expectation uses the new version.
Automation and contributor guidance
.github/workflows/*, CONTRIBUTING.md
CI commands, report paths, Javadoc paths, and documented Gradle commands now use core and core-android.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: ttypic

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch integration/split-1-core-modules

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

@ttypic ttypic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ttypic
ttypic merged commit d22cbf0 into integration/v2 Sep 16, 2026
14 of 15 checks passed
@ttypic
ttypic deleted the integration/split-1-core-modules branch September 16, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants